﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ChurchDiary.TableEntity
{
    public class EntityLogin
    {
        public string Userid { get; set; }
        public DateTime Lastlogin { get; set; }
        public string LandingAction { get; set; }
        public string LandingController { get; set; }
        public string Image { get; set; }
        public string Name { get; set; }
        public bool IsSuperAdmin { get; set; }
        public string UserTypeName { get; set; }
        public string UserTypeid { get; set; }
        public Guid Churchid { get; set; }
        public string CHChurchid { get; set; }
        public string PartitionId { get; set; }
        public string IsHeadChurch { get; set; }
        public string UserSettingsId { get; set; }
        public bool EmailNotification { get; set; }
        public bool NotificationSound { get; set; }
        public int CultureId { get; set; }
        public string DateFormate { get; set; }
        public string Area { get; set; }

        public EntityUserSettings UserSettings { get; set; }
    }
    [Table("CH_UserSettings")]
    public class EntityUserSettings
    {
        [Key]
        public Guid Userid { get; set; }
        public string UserPicture { get; set; }
        public string CoverPicture { get; set; }
        public Guid DateFormateId { get; set; }
        public string Color { get; set; }
        public Guid LanguageId { get; set; }
        public string NotificationPosition { get; set; }
        public string TimeFormat { get; set; }
        public string CurencyValue { get; set; }
        public bool NotificationSound { get; set; }
        public bool EmailNotification { get; set; }
        public Guid? CountryId { get; set; }
        public Guid? StateId { get; set; }
        public bool fixedHead { get; set; }
        public string DetaultAddress1 { get; set; }
        public string DetaultAddress2 { get; set; }
        public string DetaultPinCode { get; set; }
        public string SettingPercentage { get; set; }
        /// <summary>
        /// 0.Pending
        /// 1.Ask Later
        /// 2.Never Ask Again
        /// 3.Completed
        /// </summary>
        public string SettingStatus { get; set; }
        public Guid? Updatedby { get; set; }
        public DateTime UpdatedOn { get; set; }
        public EntityDateFormat DateFormat { get; set; }
        public EntityLanguage Language { get; set; }
        public EntityCountry Country { get; set; }
        public EntityStates States { get; set; }
    }
    
    [Table("CH_UserLogin")]
    public class EntityUser
    {
        [Key]
        public Guid Userid { get; set; }
        public string Name { get; set; }
        public Guid ChurchId { get; set; }
        public string UserName { get; set; }
        public string Password { get; set; }
        public string Emailid{ get; set; }
        public DateTime? LastLogin { get; set; }
        public int LoginCount { get; set; }
        public bool IsSuperAdmin { get; set; }
        public string Image { get; set; }
        /// <summary>
        /// 0.Deactivated
        /// 1.Active
        /// 2.Email Verification is Pending
        /// </summary>
        public int Status { get; set; }


        public List<EntityUserLoginType> UserLoginTypes { get; set; }
        public EntityUserType UserType { get; set; }
        public EntityUserSettings UserSettings { get; set; }
    }


    [Table("CH_UserType")]
    public class EntityUserType
    {
        [Key]
        public Guid UserTypeId { get; set; }
        public Guid OrganizationTypeId { get; set; }
        public string UserTypeName { get; set; }
        public string MainMenu { get; set; }
        public string SubMenu { get; set; }
        public bool IsActive { get; set; }
        public int landingPage { get; set; }
        public string MenuCategory { get; set; }
        public DateTime UpdatedDate { get; set; }
        public string ControllerName { get; set; }
        public string ActionName { get; set; }
        public string AreaName { get; set; }
    }
    public class EntityMainMenu
    {
        public int MainMenuID { get; set; }
        public int MenuCategoryid { get; set; }
        public string MenuName { get; set; }
        public string MenuIcon { get; set; }
        public string MenuTitle { get; set; }
        public string Controllername { get; set; }
        public string ActionName { get; set; }
        public string Url { get; set; }
        public bool IsActive { get; set; }
        public int OrderNo { get; set; }
        public string PageName { get; set; }
        public string PageDesc { get; set; }
    }
    public class EntitySubMenu
    {
        public int SubMenuID { get; set; }
        public int MainMenuID { get; set; }
        public string SubMenuName { get; set; }
        public string SubMenuIcon { get; set; }
        public string SubMenuTitle { get; set; }
        public string SubMenuUrl { get; set; }
        public string Controllername { get; set; }
        public string ActionName { get; set; }
        public string Area { get; set; }
        public bool IsActive { get; set; }
        public int OrderNo { get; set; }
        public string PageName { get; set; }
        public string PageDesc { get; set; }
        [NotMapped]
        public int MenuCategoryId { get; set; }
    }
    public class EntityMenuCategory
    {
        public int id { get; set; }
        public int MenuCategoryId { get; set; }
        public string MenuCategoryName { get; set; }
        public bool IsActive { get; set; }
    }
    public class EntityMenuList
    {
        public List<EntityMainMenu> entitymainmenu { get; set; }
        public List<EntitySubMenu> entitysubMenu { get; set; }
        public List<EntityMenuCategory> entitymenucategory { get; set; }
    }

    [Table("CH_UserLoginType")]
    public class EntityUserLoginType
    {
        public Guid UserLoginTypeId { get; set; }
        public Guid UserId { get; set; }
        public Guid UserTypeId { get; set; }
        public string UserTypeName { get; set; }

    }
}
